Version 1/050411 of Buttons by Emily Short begins here.

Definition: a thing is controlling if it is an on/off button or it is an on/off switch.

An on/off button is a kind of thing.

Instead of pushing an on/off button which is part of a switched off device (called the machine):
	try switching on the machine.
	
Instead of pushing an on/off button which is part of a switched on device (called the machine):
	try switching off the machine.


An on/off switch is a kind of thing.

Instead of examining an on/off switch which is part of a switched off device:
	say "[The noun] is set to OFF."

Instead of examining an on/off switch which is part of a switched on device:
	say "[The noun] is set to ON."
	
	
Understand "flip [something]" as flipping.

Flipping is an action applying to one thing.

Check flipping:
	if the noun is not an on/off switch, say "[The noun] can't be flipped." instead.
	
Carry out flipping:
	if the noun is part of a switched on device (called the machine), try switching off the machine instead;
	if the noun is part of a switched off device (called the machine), try switching on the machine instead;
	say "Nothing happens."
	
	
Instead of switching on something controlling which is part of a device (called the machine):
	try switching on the machine.

Instead of switching off something controlling which is part of a device (called the machine):
	try switching off the machine.
	

Buttons ends here.

<Documentation>

Buttons provides two kinds, an on/off button which responds to PUSH and an on/off switch which responds to SWITCH. (Both also understand TURN ON and TURN OFF.) 

These kinds of object can be made part of any device:

+	The model train is a device. 
+	An on/off switch called the train's switch is part of the model train.

The result will be that the game switches the train on and off in response to

+	>flip switch
+	>turn switch on
+	>turn off switch

but will also correctly handle 

+	>turn on train
+	>turn train off

Similarly,

+	The robotic tiger is a device. An on/off button called the tiger's button is part of the robotic tiger.

permits

+	>press button
+	You switch the robotic tiger on.
